<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>修改密码</title>
    <style>

    body {
        font-family: Arial, sans-serif;
        background-color: #f4f4f4;
        margin: 0;
        padding: 20px;
    }

    .container {
        max-width: 400px;
        margin: 0 auto;
        background-color: #fff;
        padding: 20px;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    }

    h2 {
        text-align: center;
        color: #333;
    }

    form {
        margin-top: 20px;
    }

    label {
        display: block;
        margin-bottom: 5px;
    }

    input[type="password"] {
        width: 100%;
        padding: 10px;
        margin-bottom: 20px;
        border: 1px solid #ddd;
        border-radius: 4px;
    }

    input[type="submit"] {
        width: 100%;
        padding: 10px;
        border: none;
        background-color: #5cb85c;
        color: white;
        border-radius: 4px;
        cursor: pointer;
    }

    input[type="submit"]:hover {
        background-color: #4cae4c;
    }

    .flashes {
        list-style-type: none;
        padding: 0;
    }

    .flashes li {
        color: red;
        text-align: center;
        margin-bottom: 10px;
    }

    a {
        display: block;
        text-align: center;
        margin-top: 20px;
        color: #333;
        text-decoration: none;
    }

    a:hover {
        text-decoration: underline;
    }
</style>


    
</head>
<body>
    {% with messages = get_flashed_messages() %}
    {% if messages %}
      <ul class="flashes">
      {% for message in messages %}
        <li>{{ message }}</li>
      {% endfor %}
      </ul>
    {% endif %}
  {% endwith %}

    <h2>修改密码</h2>
    <form method="POST" action="{{ url_for('change_password') }}">
        <label for="old_password">旧密码:</label>
        <input type="password" id="old_password" name="old_password" required>
        <br>
        <label for="new_password">新密码:</label>
        <input type="password" id="new_password" name="new_password" required>
        <br>
        <input type="submit" value="更改密码">
    </form>
    <br>
    <a href="{{ url_for('index') }}">返回主页</a>
</body>
</html>
